home *** CD-ROM | disk | FTP | other *** search
- # check button motion
-
- proc track_motion {event} {
- set type [xEvent $event T]
- puts stdout "Event type: $type"
- set x [xEvent $event x]
- set y [xEvent $event y]
- puts stdout "moved to $x $y"
- }
-
- xtAppInitialize -class Program
-
- xmPushButton .fred managed
-
- .fred setValues -translations "<Motion>: action(track_motion %event)"
- . realizeWidget
-
- . mainLoop
-